08. Mapping: Map My World

Map My World!

We have everything ready to go. Launch the ROS nodes and let us start mapping.

First, launch the Gazebo world and RViz, spawn the robot in the environment:

roslaunch <YOUR PACKAGE NAME> world.launch

Then, launch the teleop node:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Finally, launch your mapping node:

roslaunch <YOUR PACKAGE NAME> mapping.launch

Navigate your robot in the simulation to create map for the environment! When you are all set, terminal the node and you could find your map db file in the place you specified in the launch file. If you did not modify the argument, it will be located in the /root/.ros/ folder.

Best Practices

You could start by lower velocity. Our goal is to create a great map with the least amount of passes as possible. Getting 3 loop closures will be sufficient for mapping the entire environment. You can maximize your loop closures by going over similar paths two or three times. This allows for the maximization of feature detection, facilitating faster loop closures! When you are done mapping, be sure to copy or move your database before moving on to map a new environment. Remember, relaunching the mapping node deletes any database in place on launch start up!